﻿<Window x:Class="BookDemoApp.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:local="clr-namespace:BookDemoApp" 
	xmlns:controls="clr-namespace:WPFMitsuControls;assembly=WPFMitsuControls"
    Title="WPF Flippage sample" Height="600" Width="800"
	Loaded="OnLoaded">
  <DockPanel>
    <DockPanel.Resources>
      <Style x:Name="title" TargetType="{x:Type Label}">
        <Setter Property="Template">
          <Setter.Value>
            <ControlTemplate>
              <Border BorderThickness="2" BorderBrush="Black" Background="Gray"
                      DockPanel.Dock="Top" HorizontalAlignment="Center" CornerRadius="0 0 5 5" Padding="5 0 5 0">
              </Border>
            </ControlTemplate>
          </Setter.Value>          
        </Setter>
      </Style>
    </DockPanel.Resources>
    <DockPanel.Background>
      <LinearGradientBrush StartPoint="0 0.4 " EndPoint="1 0.6">
        <GradientStop Offset="0" Color="DarkGray" />
        <GradientStop Offset="0.5" Color="White" />
        <GradientStop Offset="1" Color="DarkGray" />
      </LinearGradientBrush>
    </DockPanel.Background>
		<ToolBarTray DockPanel.Dock="Top">
			<ToolBar Band="0">
			  <Button Click="PreviousClick">Previous sheet</Button>
			  <Button Click="NextClick">Next sheet</Button>
  			  <Separator />
			  <Button Click="AutoPreviousClick">Animate to previous sheet</Button>
			  <Button Click="AutoNextClick">Animate to next sheet</Button>
			  <ComboBox x:Name="cbFromTop" IsEditable="False" IsReadOnly="True" SelectedIndex="1">
				<ComboBoxItem>From top</ComboBoxItem>
				<ComboBoxItem>From bottom</ComboBoxItem>
			  </ComboBox>
			</ToolBar>
			<ToolBar Band="1">
				<CheckBox IsChecked="False" Checked="DisplayModeChecked" Unchecked="DisplayModeChecked" Content="Zoom on page" />
				<Button Click="AutoPreviousPageClick">Auto previous page</Button>
				<Button Click="AutoNextPageClick">Auto next page</Button>
			</ToolBar>
		</ToolBarTray>
	<Viewbox Margin="50">
	  <Grid>
		<controls:Book x:Name="myBook" Width="600" Height="400" Margin="25">
			<controls:Book.ItemTemplate>
				<DataTemplate>
					<Border BorderThickness="4" BorderBrush="Gray" Background="Transparent">
						<ContentControl Content="{Binding .}" />
					</Border>
				</DataTemplate>
			</controls:Book.ItemTemplate>
			<local:UCCube />
			<local:UCControls />
			<local:UCClippingTransparency />
			<local:UCClippingTransparency />
			<local:UCClipping />
			<local:UCClipping />
			<local:UCTriggers />
			<local:UCFixedDocument />
			<local:UCDataBindingTransformation />
			<local:UCXaml />
			<local:UCAbout />
			<local:UCTheEnd />
		</controls:Book>
    	<Button Content="&lt;" HorizontalAlignment="Left" VerticalAlignment="Center" 
    		VerticalContentAlignment="Center" Background="Transparent" Height="50" Click="AutoPreviousClick" />
		<Button Content="&gt;" HorizontalAlignment="Right" VerticalAlignment="Center"
		    VerticalContentAlignment="Center" Background="Transparent" Height="50" Click="AutoNextClick" />
	  </Grid>
	</Viewbox>
  </DockPanel>
</Window>
